package edu.indiana.d2i.vmm.job;

import edu.indiana.d2i.vmm.SigiriHTRCConfiguration;
import edu.indiana.d2i.vmm.SigiriHTRCJobManager;
import edu.indiana.d2i.vmm.vm.BasicHTRCVMController;
import edu.indiana.extreme.sigiri.JobInfoBean;
import edu.indiana.extreme.sigiri.util.ConnectionManager;

// based on software framework name? or based on #instances?
public class SigiriHTRCJobMgrFactory {
	public static SigiriHTRCJobManager getJobManager(
			ConnectionManager connectionManager, BasicHTRCVMController vmController,
			JobInfoBean jobInfoBean, SigiriHTRCConfiguration configuration) {
		SigiriHTRCJobManager jobMgr = null;
		
		if (vmController.getVMInfo().size() > 1)
			jobMgr = new SigiriHTRCSingleVMJobMgr(connectionManager,
					vmController, jobInfoBean, configuration);
		else 
			jobMgr = new SigiriHTRCSingleVMJobMgr(connectionManager,
					vmController, jobInfoBean, configuration);

		return jobMgr;
	}
}
